/**
 * ClassName ThreadDemo
 * Description TODO
 * Author Hexiao
 * Date 2018/8/24 11:30
 * Version 1.0
 **/
public class ThreadDemo extends Thread{
    public void run(){
        System.out.println(Thread.currentThread().getName());
    }
    public static void main(String[] args) {
        ThreadDemo t1 = new ThreadDemo();
//        t1.setName("t1");
        ThreadDemo t2 = new ThreadDemo();
//        t1.setName("t2");
        ThreadDemo t3 = new ThreadDemo();
//        t1.setName("t3");

        t1.setPriority(10);
        t2.setPriority(2);
        t3.setPriority(5);

        t1.start();
        t2.start();
        t3.start();
    }
}